<?php
/*
 * If a version parameter: check against latest version.
 * If same version: return OK web page 
 * If different version: return need to upgrade web page
 * 
 * If no parameters: show info web-page
 * 
 */

if (isset($_GET['version']) && $_GET['version'] != "") {

$currentVersion = $_GET['version'];
$latestVersion = '0.5';

if ($currentVersion == $latestVersion) {
	@include 'upToDate.php';
} else {
	// TODO how do we handle update from different older versions
	// can't pass parameters to an included file? NO - but they have access to vars in 
	// the scope where they are included.
	@include 'needToUpdate.php';
}

} else {

@include  'information.php';

}

?>